package runnables;

/**
 * This interface is designed to provide a common method for objects that execute code
 * and wish to procide an Observer with the opportunity to stop them. 
 */
public interface Stoppable {

    /**
     * Invoke this method to indicate to the Object that it should stop processing.
     * @return true, if the Object has recognied this and will stop
     * Note thst an already stopped Object should return true.
     */
    public boolean stop();

    /**
     * Indicate if this Object has already been stopped, or is not active
     * in other words, a stop is not required to stop the processing.
     * @return true, if the object has been, or is the process of stopping.  
     */
    public boolean isStopped();

}

